package com.mybatis.study.test.facadepatterns;

import jakarta.annotation.PostConstruct;

/**
 * program: MybatisStudy
 * <p>
 * description: 外观模式的复习
 * <p>
 * author: xiaoxie
 * <p>
 * create: 2024-07-21 22:00
 **/
public class LightController {
    public HallLight hallLight = new HallLight();
    public HomeRoomLight homeRoomLight = new HomeRoomLight();
    public LivingLight livingLight = new LivingLight();
    @PostConstruct
    public  void AllOnLight() {
        livingLight.onLight();
        hallLight.onLight();
        homeRoomLight.onLight();
    }
    @PostConstruct
    public void AllOffLight() {
        livingLight.offLight();
        hallLight.offLight();
        homeRoomLight.offLight();
    }
}
